<?php

function createConnection ()
{
    
    global $host, $user, $password, $dbname, $erroreDatabase;
    
    //connessione al db
    $db = mysql_connect($host, $user, $password); 
    //check connessione
    if (!$db) 
        die ($erroreDiConnessione); 
    mysql_select_db($dbname, $db) 
        or die ($erroreDatabase);
    
    return $db;
}

?>
